<template>
  <el-dialog
    class="dia-style"
    title="系统级联注册"
    :visible.sync="open"
    :modal-append-to-body="false"
  >
    <el-form
      ref="formRef"
      :model="formData"
      :rules="rules"
      label-width="106px"
      label-position="left"
      style="padding-left: 150px"
    >
      <el-form-item
        label="上级单位名称:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="认证地址:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="单位名称:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="单位类别:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-select
          v-model="form.name"
          size="small"
          style="width: 73%"
          placeholder="党政机关"
        ></el-select>
      </el-form-item>
      <el-form-item
        label="保密资质:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="涉密证书:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="综合设计证书:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="检测器证书"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="协议类型:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-select
          v-model="form.name"
          size="small"
          style="width: 73%"
          placeholder="http"
        ></el-select>
      </el-form-item>
      <el-form-item
        label="IP:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
      <el-form-item
        label="端口:"
        :label-width="formLabelWidth"
        style="margin-bottom: 5px"
      >
        <el-input
          v-model="form.name"
          size="small"
          style="width: 73%"
        ></el-input>
      </el-form-item>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <!-- <el-button type="primary" @click="submitForm">注册</el-button> -->
      <el-button @click="cancel">返回</el-button>
    </div>
  </el-dialog>
</template>
<script>
// import { addDictClassify, updateDictClassify } from '@/api/milkyway/dictManager'
export default {
  props: {
    title: {
      type: String,
      default() {
        return "下发风险预警";
      },
    },
  },
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
      },
      value1: "",
      radio: "1",
      // 是否显示弹出层
      open: false,
      // 标题宽度
      labelWidth: "100",
      // 是否显示按钮
      btnHidden: true,
      // 表单项配置
      formLabelWidth: "120px",
      // 表单校验
      rules: {
        name: [{ required: true, message: "请输入要素名称", trigger: "blur" }],
        code: [{ required: true, message: "请输入要素来源", trigger: "blur" }],
        sort: [{ required: true, message: "", trigger: "blur" }],
      },
    };
  },
  computed: {
    formData: {
      get() {
        return this.form;
      },
      set(val) {},
    },
  },
  watch: {},
  created() {},
  methods: {
    show() {
      this.open = true;
      this.reset();
    },
    /** 提交按钮 */
    async submitForm() {
      this.open = false;
    },
    // 取消按钮
    cancel() {
      this.open = false;
      this.reset();
    },
    // 表单重置
    reset() {
      this.formData = {
        id: undefined,
        code: undefined,
        createDate: undefined,
        flag: undefined,
        isDeleted: undefined,
        modifiedDate: undefined,
        name: undefined,
        sort: undefined,
      };
    },
  },
};
</script>

<style scoped lang="scss">
::v-deep .dia-style .el-dialog .el-dialog__body {
  padding: 55px;
}
::v-deep .el-dialog__wrapper .el-form-item {
  margin-bottom: 1px;
}
::v-deep .dia-style .el-dialog .el-dialog__body {
  padding: 55px !important;
}

::v-deep .el-icon-date:before {
  // content: "";
  margin-left: 339px;
}
::v-deep .el-input--prefix .el-input__inner {
  padding-left: 15px;
}
::v-deep .el-textarea__inner {
  resize: none;
}
::v-deep {
  
  .el-dialog__body {
    height: auto !important;
  }
  .el-dialog__footer {
    position: absolute;
    bottom: 0;
  }
}
::v-deep .el-textarea__inner {
  width: 635px;
  height: 150px;
}
::v-deep [data-v-2d25da19] .el-input--prefix .el-input__inner {
  padding-left: 39px;
}
::v-deep [data-v-2d25da19] .el-icon-date:before {
  margin-left: 11px;
}
::v-deep [data-v-369a799c] .el-input--prefix .el-input__inner {
  padding-left: 30px;
}
</style>
